#ifndef CAST_MAP_H
#define CAST_MAP_H

#include "UdmBase.h"

/**
* @file CastMap.h
* @author James Edmondson <jedmondson@gmail.com>
*
*  This is a hack around the lazy initialization of GOAL classes
*  by the UDM framework. The purpose of these functions is to give
*  the user a clean interface to cast to the appropriate derived type
*  when using the GOAL::*::*_kind_children type functions (which will
*  only create the base class type (even if it is abstract) /facepalm.
*/

namespace GOAL
{
  /// This function is required before using castByMeta
  void setupCastMap(void);
  
  /// This function casts to the appropriate derived object
  /// @param source object to cast to its true derived object
  Udm::ObjectImpl * castByMeta (const GOAL::MgaObject& source);
}

#endif